﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="MARC.EHRS.Silverlight.StatusBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <Style x:Key="MenuButtonStyle" TargetType="RepeatButton">
            <Style.Setters>
                <Setter Property="Padding" Value="10,0"/>
                <Setter Property="Width" Value="32"/>
                <Setter Property="Height" Value="32"/>
                <Setter Property="Margin" Value="12"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="RepeatButton">
                            <Grid Name="Grid">
                                <Grid.RenderTransform>
                                    <CompositeTransform TranslateX="0" TranslateY="0" ScaleX="1" ScaleY="1"/>
                                </Grid.RenderTransform>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal">
                                            <Storyboard>
                                                <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.ScaleY)" To="1" Duration="0:0:0.1"/>
                                                <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.ScaleX)" To="1" Duration="0:0:0.1"/>
                                                <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.TranslateX)" To="0" Duration="0:0:0.1"/>
                                                <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.TranslateY)" To="0" Duration="0:0:0.1"/>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.ScaleY)" To="1.5" Duration="0:0:0.1"/>
                                                <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.ScaleX)" To="1.5" Duration="0:0:0.1"/>
                                                <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.TranslateX)" To="-12" Duration="0:0:0.1"/>
                                                <DoubleAnimation Storyboard.TargetName="Grid" Storyboard.TargetProperty="(Grid.RenderTransform).(CompositeTransform.TranslateY)" To="-16" Duration="0:0:0.1"/>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border x:Name="Border" CornerRadius="6" BorderBrush="#22990033" BorderThickness="1">
                                </Border>
                                <ContentPresenter
                                        Content="{TemplateBinding Content}"
                                        ContentTemplate="{TemplateBinding ContentTemplate}"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center">

                                </ContentPresenter>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style.Setters>

        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
            <Grid.Background>
                <SolidColorBrush Color="#AA000000"/>
            </Grid.Background>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="32"/>
                <RowDefinition Height="64"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="64"/>
            <ColumnDefinition Width="64"/>
        </Grid.ColumnDefinitions>
            <Border CornerRadius="6" Grid.ColumnSpan="3" Grid.RowSpan="2" Grid.Row="1" BorderThickness="1" BorderBrush="White">
                <Border.Background>
                    <SolidColorBrush Color="#AA000000"/>
                </Border.Background>
            </Border>
        <TextBlock Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontWeight="Bold" Name="lblStatus" Foreground="White" TextWrapping="Wrap">Connecting</TextBlock>

        <RepeatButton Grid.Row="2" Grid.Column="1" Style="{StaticResource MenuButtonStyle}"  Name="btnAccept" ToolTipService.Placement="Bottom" ToolTipService.ToolTip="Accept the outcome of the operation" Click="btnAccept_Click">
                <Image Source="button_accept.png" Stretch="UniformToFill"/>
            </RepeatButton>
            <RepeatButton Grid.Row="2" Grid.Column="2" Style="{StaticResource MenuButtonStyle}"  Name="btnCancel" ToolTipService.Placement="Bottom" ToolTipService.ToolTip="Cancel the operation" Click="btnCancel_Click">
                <Image Source="button_cancel.png" Stretch="UniformToFill"/>
            </RepeatButton>
    </Grid>
</UserControl>
